package com.lemon.cloud.mp.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.lemon.cloud.core.sensitive.Sensitive;
import com.lemon.cloud.core.sensitive.SensitiveTypeEnum;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
    * 公众号账户表
    */
@Data
@TableName(value = "wx_account")
public class WxAccount implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @TableField(value = "name")
    private String name;

    @TableField(value = "account")
    private String account;

    @TableField(value = "appid")
    private String appid;

    @TableField(value = "appsecret")
    @Sensitive(type = SensitiveTypeEnum.KEY)
    private String appsecret;

    @TableField(value = "url")
    private String url;

    @TableField(value = "token")
    @Sensitive(type = SensitiveTypeEnum.KEY)
    private String token;

    @TableField(value = "aeskey")
    @Sensitive(type = SensitiveTypeEnum.KEY)
    private String aeskey;

    @TableField(value = "qr_url")
    private String qrUrl;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    private Date updateTime;

    @TableLogic
    private String delFlag;

    /**
     * 租户Id
     */
    @TableField(value = "tenant_id")
    private Integer tenantId;

    @TableField(value = "front_url")
    private String frontUrl;

    public static final String COL_ID = "id";

    public static final String COL_NAME = "name";

    public static final String COL_ACCOUNT = "account";

    public static final String COL_APPID = "appid";

    public static final String COL_APPSECRET = "appsecret";

    public static final String COL_URL = "url";

    public static final String COL_TOKEN = "token";

    public static final String COL_AESKEY = "aeskey";

    public static final String COL_QR_URL = "qr_url";

    public static final String COL_CREATE_TIME = "create_time";

    public static final String COL_UPDATE_TIME = "update_time";

    public static final String COL_DEL_FLAG = "del_flag";

    public static final String COL_TENANT_ID = "tenant_id";
}
